package com.example.mybatisplus.video.controller;

import com.example.mybatisplus.video.domain.Question;
import com.example.mybatisplus.video.service.QuestionService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * 问题
 *
 * @author zhouxl
 * @DATE 2020/9/27
 * @descriptoin
 */
@Api("问题api")
@Controller
@RequestMapping("/api/question")
public class QuestionController {

    @Autowired
    private QuestionService questionService;

    /**
     * 添加问题信息
     *
     * @return
     */
    @RequestMapping("/addQuestion")
    @ResponseBody
    public Object addQuestion(Question question) {
        Map<String, Object> result = questionService.addQuestion(question);
        return result;
    }

}
